<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#f{
				width: 200px;
				height: 200px;
				background-color: greenyellow;
				text-align: center;
				line-height:200px;
			}
		</style>
	</head>
	<body>
		<div id="f">
			666
		</div>
		<select id="jump">
			<option value="">Defult</option>
			<option value="bai">百度</option>
			<option value="xin">新浪</option>
			<option value="sou">搜狐</option>
			<option value="teng">腾讯</option>
		</select>
	</body>
	<script type="text/javascript">
	
		document.getElementById("f").onclick = change;
		function change () {
			document.getElementById("f").style.backgroundColor = 'yellow';
			setTimeout(`document.getElementById("f").style.backgroundColor = 'green';`,3000);
			setTimeout("location.reload();",5000);
		}
		
		document.getElementById("jump").onchange = changeLord;
		function changeLord () {
			var arr = document.getElementsByTagName("option");
			var index = document.getElementById("jump").selectedIndex;
			switch(arr[index].value){
				case "bai":
					location.href = "https://www.baidu.com";
					break;
				case "xin":
					location.href = "https://www.sina.com.cn";
					break;
				case "sou":
					location.href = "https://www.sohu.com";
					break;
				case "teng":
					location.href = "https://www.qq.com";
					break;
			}
		}
	</script>
</html>
